# 列表的创建方式
# list_one = []
# list_two = ['p','y','t','h','o','n']
# list_three = [1,'a','&',2.3]
#
# list_one = list(1)
# list_two = list('python')
# list_three = list([1,'python'])
#
# list_demo01 = ["Java","C#","Python","PHP"]
# print(list_demo01[2])
# print(list_demo01[-1])
# 访问列表元素
# li_one = ["自","古","风","云","多","变","幻"
#           ,"不","以","成","败","论","英","雄"]
# print(li_one[2:10])
# print(li_one[:10])
# print(li_one[2:])
# print(li_one[:])
# print(li_one[2:10:2])

# 添加列表元素
# list_one = [1,2,3,4]
# list_one.append(5)
# print(list_one)
#
# list_str = ['a','b','c']
# list_num = [1,2,3]
# list_str.extend(list_num)
# print(list_num)
# print(list_str)
#
# names = ['baby','Lucy','Alise']
# names.insert(2,'Peter')
# print(names)

# 删除列表元素
# names = ['小明','小红','小华','小花','小李','小张']
# del names[0]
# print(names)
# del names[1:3]
# print(names)
#
# chars = ['h','e','l','l','e']
# chars.remove('e')
# print(chars)
#
# numbers = [1,2,3,4,5]
# numbers.pop()
# print(numbers)
# numbers.pop(1)
# print(numbers)